﻿using Raven.Client;
using Raven.Client.Document;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace DDBS_Server.Models
{
    public static class RavenContext
    {
        public static readonly IDocumentStore ServerDB = new DocumentStore
        {
            ConnectionStringName = "RavenDB" // Server database (DDBS_ServerDB) for storing users, sample databases connections, etc.
        }.Initialize();

        public static IDocumentSession CreateSession()
        {
            return ServerDB.OpenSession();
        }
    }
}